module Language.ASTExpr.Syntax where

import Text.ParserCombinators.Parsec.Pos

data SourceSpan = SrcSpan { srcFrom :: SourcePos, srcTo :: SourcePos } deriving (Show, Eq, Ord) 

--data Expressions = Exprs SourceSpan [Expr] deriving (Show,Eq, Ord)

data Expr 
     =  Const SourceSpan Int
     |  Add   SourceSpan Expr  Expr
     |  Mul   SourceSpan Expr  Expr
     |  Neg   SourceSpan Expr
     |  EVar  SourceSpan Char
     |  Let   SourceSpan Decl  Expr
     deriving (Show,Eq, Ord)
 
data Decl 
     =  (:=) SourceSpan  Char Expr
     |  Seq  SourceSpan  Decl  Decl
     |  None SourceSpan
     deriving (Show,Eq,Ord)

